<template>
  <div class="whole wholeComprehensive">
    <div class="crumbs">
      <a-breadcrumb>
        <a-breadcrumb-item v-for="(item, index) in $route.matched" :key="index">
          <span v-if="index + 1 < $route.matched.length">{{
            item.meta.title
          }}</span>
          <router-link
            v-if="index + 1 == $route.matched.length"
            :to="item.path"
            >{{ item.meta.title }}</router-link
          >
        </a-breadcrumb-item>
      </a-breadcrumb>
    </div>
    <div class="addDistributed" v-if="addShow">
      <a-button :class="butAdmin" class="userAbut" type="primary" @click="addDistributed"
        >+新建</a-button
      >
    </div>
    <a-table
      :class="TableAdmin"
      class="ReportTable"
      rowKey="id"
      :columns="columns"
      :data-source="comprehensiveList"
      :pagination="pagination"
    >
      <span class="ReportTableOperate" v-if="record.isUse == 1" slot="isUse" slot-scope="text, record">
        <span class="ReportTableStatus1"></span>使用中
      </span>
      <span class="ReportTableOperate" v-else slot="isUse">
        <span class="ReportTableStatus"></span>未使用
      </span>
      <span slot="num" slot-scope="text, record, index">
        {{
          (pagination.current - 1) * pagination.pageSize + parseInt(index) + 1
        }}
      </span>
      <template slot="operations" slot-scope="text, record">
        <div class="editable-row-operations">
          <span v-if="deleteShow">
            <a-popconfirm
              v-if="comprehensiveList.length"
              title="确认删除?"
              @confirm="() => Delete(record.id)"
            >
              <a href="javascript:;" title="删除">
                <a-icon type="delete" style="color: red; fontsize: 16px" />
              </a>
            </a-popconfirm>
          </span>
          <span class="jiange"></span>
          <span v-if="editShow">
            <a @click="edit(record.id)" title="编辑">
              <a-icon type="edit" style="color: #7a7d7e; fontsize: 16px" />
            </a>
          </span>
          <span class="jiange"></span>
          <div class="useDiv" v-if="useShow">
            <span v-if="record.isUse == 0" @click="reportlsUse(record.id)">
              <a href="javascript:;" title="使用模板">
                <a-icon type="tool" style="color: #7a7d7e; fontsize: 16px" />
              </a>
            </span>
            <span v-if="record.isUse == 1" @click="CancelUse(record.id)">
              <a href="javascript:;" title="取消使用">
                <a-icon type="tool" style="color: #7a7d7e; fontsize: 16px" />
              </a>
            </span>
          </div>

        </div>
      </template>
    </a-table>
    <div class="Loading" v-show="Loading">
      <a-spin tip="Loading..."></a-spin>
    </div>
    <!-- 添加 -->
    <div class="aModalReport" ref="aModalReport">
      <a-modal
        v-model="addVisible"
        :maskClosable="false"
        :mask="false"
        :getContainer="() => $refs.aModalReport"
        title="添加档案模板配置"
      >
        <template slot="footer">
          <a-button :class="TableButSave" class="butSave" @click="closeAddComprehensive">添加</a-button>
          <a-button :class="TableButReset" @click="closeReturnComprehensive" class="butReset">重置</a-button>
        </template>
        <a-form-model
          hideRequiredMark
          ref="ruleForm"
          :model="formModel"
          :rules="rules"
          :label-col="labelCol1"
          :wrapper-col="wrapperCol1"
        >
          <a-form-model-item ref="archivesName" prop="archivesName" label="名称">
            <a-input
              v-model="formModel.archivesName"
              @blur="
                () => {
                  $refs.archivesName.onFieldBlur();
                }
              "
            />
          </a-form-model-item>

          <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addHISDeploy"
              >添加HIS展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addBasicsList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addBasicsList.length"
                    title="确认删除?"
                    @confirm="() => aModalHISDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table>

          <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addLISDeploy"
              >添加LIS展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addLISList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addLISList.length"
                    title="确认删除?"
                    @confirm="() => aModalLISDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table>

          <!-- <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addpacsDeploy"
              >添加pacs展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addpacsList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addpacsList.length"
                    title="确认删除?"
                    @confirm="() => aModalpacsDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table> -->

          <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addBLDeploy"
              >添加病理展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addBLList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addBLList.length"
                    title="确认删除?"
                    @confirm="() => aModalBLDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table>

          <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addYZDeploy"
              >添加医嘱展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addYZList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addYZList.length"
                    title="确认删除?"
                    @confirm="() => aModalYZDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table>

          <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addEMRDeploy"
              >添加EMR展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addEMRList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addEMRList.length"
                    title="确认删除?"
                    @confirm="() => aModalEMRDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table>

        </a-form-model>
      </a-modal>
    </div>
    <!-- 编辑 -->
    <div class="aModalReport1" ref="aModalReport1">
      <a-modal
        v-model="editVisible"
        :maskClosable="false"
        :mask="false"
        :getContainer="() => $refs.aModalReport1"
        title="编辑档案模板配置"
      >
        <template slot="footer">
          <a-button :class="TableButSave" class="butSave" @click="closeEditComprehensive">提交</a-button>
          <a-button :class="TableButReset" @click="closeReturnComprehensive" class="butReset">重置</a-button>
        </template>

        <a-form-model
          hideRequiredMark
          ref="ruleForm"
          :model="formModel"
          :rules="rules"
          :label-col="labelCol1"
          :wrapper-col="wrapperCol1"
        >
          <a-form-model-item ref="archivesName" prop="archivesName" label="名称">
            <a-input
              v-model="formModel.archivesName"
              @blur="
                () => {
                  $refs.archivesName.onFieldBlur();
                }
              "
            />
          </a-form-model-item>

          <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addHISDeploy"
              >添加HIS展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addBasicsList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addBasicsList.length"
                    title="确认删除?"
                    @confirm="() => aModalHISDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table>

          <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addLISDeploy"
              >添加LIS展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addLISList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addLISList.length"
                    title="确认删除?"
                    @confirm="() => aModalLISDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table>

          <!-- <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addpacsDeploy"
              >添加pacs展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addpacsList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addpacsList.length"
                    title="确认删除?"
                    @confirm="() => aModalpacsDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table> -->

          <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addBLDeploy"
              >添加病理展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addBLList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addBLList.length"
                    title="确认删除?"
                    @confirm="() => aModalBLDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table>

          <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addYZDeploy"
              >添加医嘱展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addYZList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addYZList.length"
                    title="确认删除?"
                    @confirm="() => aModalYZDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table>

          <div class="reportTitle">
            <span class="left"></span>
            <span class="center" style="cursor: pointer;" @click="addEMRDeploy"
              >添加EMR展示内容配置</span
            >
            <span class="right"></span>
          </div>
          <a-table
            style="width: 100%"
            class="aTable"
            rowKey="id"
            :columns="columns1"
            :data-source="addEMRList"
            :pagination="false"
          >
            <template slot="operations" slot-scope="text, record">
              <div class="editable-row-operations">
                <span>
                  <a-popconfirm
                    v-if="addEMRList.length"
                    title="确认删除?"
                    @confirm="() => aModalEMRDelete(record.configId)"
                  >
                    <a href="javascript:;" title="删除">
                      <a-icon
                        type="delete"
                        style="color: red; fontsize: 16px"
                      />
                    </a>
                  </a-popconfirm>
                </span>
                <span class="jiange"></span>
                <span>
                  <a href="javascript:;" @click="aModalReportEdit(record)" title="编辑">
                    <a-icon
                      type="edit"
                      style="color: #7a7d7e; fontsize: 16px"
                    />
                  </a>
                </span>
              </div>
            </template>
          </a-table>

        </a-form-model>

      </a-modal>
    </div>

    <!-- 添加HIS展示内容配置 -->
    <div class="aModalReport2" ref="aModalReport2">
      <a-modal
        v-model="addBasicsVisible"
        :maskClosable="false"
        :mask="false"
        :getContainer="() => $refs.aModalReport2"
        title="添加展示内容配置"
      >
        <template slot="footer">
          <a-button class="butSave" @click="addHISComprehensive">添加</a-button>
          <a-button @click="addBasicsreturn" class="butReset">返回</a-button>
        </template>

        <a-table
          class="addBasicsAtable"
          :columns="addBasicsColumns"
          :data-source="addHISData"
          :row-selection="rowSelection"
          :pagination="false"
        >
        </a-table>
      </a-modal>
    </div>
    <!-- 添加LIS展示内容配置 -->
    <div class="aModalReport2" ref="aModalReport2">
      <a-modal
        v-model="addLISVisible"
        :maskClosable="false"
        :mask="false"
        :getContainer="() => $refs.aModalReport2"
        title="添加展示内容配置"
      >
        <template slot="footer">
          <a-button class="butSave" @click="addLISComprehensive">添加</a-button>
          <a-button @click="addLISreturn" class="butReset">返回</a-button>
        </template>

        <a-table
          class="addBasicsAtable"
          :columns="addBasicsColumns"
          :data-source="addLISData"
          :row-selection="rowSelection"
          :pagination="false"
        >
        </a-table>
      </a-modal>
    </div>
    <!-- 添加病理展示内容配置 -->
    <div class="aModalReport2" ref="aModalReport2">
      <a-modal
        v-model="addBLVisible"
        :maskClosable="false"
        :mask="false"
        :getContainer="() => $refs.aModalReport2"
        title="添加展示内容配置"
      >
        <template slot="footer">
          <a-button class="butSave" @click="addBLComprehensive">添加</a-button>
          <a-button @click="addBLreturn" class="butReset">返回</a-button>
        </template>

        <a-table
          class="addBasicsAtable"
          :columns="addBasicsColumns"
          :data-source="addBLData"
          :row-selection="rowSelection"
          :pagination="false"
        >
        </a-table>
      </a-modal>
    </div>
    <!-- 添加医嘱展示内容配置 -->
    <div class="aModalReport2" ref="aModalReport2">
      <a-modal
        v-model="addYZVisible"
        :maskClosable="false"
        :mask="false"
        :getContainer="() => $refs.aModalReport2"
        title="添加展示内容配置"
      >
        <template slot="footer">
          <a-button class="butSave" @click="addYZComprehensive">添加</a-button>
          <a-button @click="addYZreturn" class="butReset">返回</a-button>
        </template>

        <a-table
          class="addBasicsAtable"
          :columns="addBasicsColumns"
          :data-source="addYZData"
          :row-selection="rowSelection"
          :pagination="false"
        >
        </a-table>
      </a-modal>
    </div>
    <!-- 添加EMR展示内容配置 -->
    <div class="aModalReport2" ref="aModalReport2">
      <a-modal
        v-model="addEMRVisible"
        :maskClosable="false"
        :mask="false"
        :getContainer="() => $refs.aModalReport2"
        title="添加展示内容配置"
      >
        <template slot="footer">
          <a-button class="butSave" @click="addEMRComprehensive">添加</a-button>
          <a-button @click="addEMRreturn" class="butReset">返回</a-button>
        </template>

        <a-table
          class="addBasicsAtable"
          :columns="addBasicsColumns"
          :data-source="addEMRData"
          :row-selection="rowSelection"
          :pagination="false"
        >
        </a-table>
      </a-modal>
    </div>
    <!-- 编辑展示内容配置 -->
    <div class="aModalReport3" ref="aModalReport3">
      <a-modal
        v-model="editBasicsVisible"
        :maskClosable="false"
        :mask="false"
        :getContainer="() => $refs.aModalReport3"
        title="编辑展示内容配置"
      >
        <template slot="footer">
          <a-button class="butSave" @click="editBasicsReport">提交</a-button>
          <a-button @click="editBasicsreturn" class="butReset">返回</a-button>
        </template>

        <a-form hideRequiredMark class="addForm" :form="form">
          <a-form-item class="aFormItem" v-bind="formItemLayout" label="展示内容名称">
            <a-input
              v-decorator="[
            'showName',
            {
              rules: [
                {
                  required: true,
                  message: '请输入展示内容名称',
                },
              ],
            },
          ]"
            />
          </a-form-item>

          <a-form-item class="aFormItem" v-bind="formItemLayout" label="排序号">
            <a-input
              v-decorator="[
            'sortCode',
            {
              rules: [
                {
                  required: true,
                  message: '请输入排序号',
                },
              ],
            },
          ]"
            />
          </a-form-item>

        </a-form>

      </a-modal>
    </div>
  </div>
</template>

<script>
import moment from "moment";
//import api from '../../api/report/report.js'
import api from '../../api/comprehensive/comprehensive.js'
export default {
  data() {
    return {
      addShow: false,
      deleteShow: false,
      useShow: false,
      editShow: false,
      archivesType:'',
      Loading: false,
      centerInp: "",
      startTimeApply: "",
      endTimeApply: "",
      comprehensiveList:[],
      formItemLayout: {
        labelCol: {
          xs: { span: 24 },
          sm: { span: 8 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
      },
      rangeConfig: {
        rules: [
          { type: "array", required: false, message: "Please select time!" },
        ],
      },

      columns: [
        {
          title: "序号",
          dataIndex: "index",
          key: "index",
          scopedSlots: { customRender: "num" },
          width: 78,
        },
        {
          title: "名称",
          dataIndex: "archivesName",
          scopedSlots: { customRender: "archivesName" },
          width: 130,
        },
        {
          title: "使用状态",
          dataIndex: "isUse",
          scopedSlots: { customRender: "isUse" },
          width: 78,
        },
        {
          title: "操作时间",
          dataIndex: "createTime",
          scopedSlots: { customRender: "createTime" },
          width: 100,
          customRender: (text, row, index) => {
            return moment(text).format("YYYY-MM-DD HH:mm:ss");
          },
        },
        {
          title: "操作",
          dataIndex: "operations",
          scopedSlots: { customRender: "operations" },
          width: 78,
        },
      ],
      pagination: {
        current: 1,
        pageSize: 10,
        total: 0,
        defaultPageSize: 10,
        showTotal: (total) => `共 ${total} 条数据`,
        pageSizeOptions: ["5", "10", "15", "20"],
        onShowSizeChange: (current) => this.onSizeChange(current),
        onChange: (current, pageSize) => this.onPageChange(current, pageSize),
      },
      systForm: {},
      addVisible: false,
      editVisible: false,
      addBasicsVisible: false,
      addLISVisible:false,
      addpacsVisible:false,
      addBLVisible:false,
      addYZVisible:false,
      addEMRVisible:false,
      editBasicsVisible: false,
      // 编辑的回显数据
      editEchoData:{},
      value: 1,
      configId:'',
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 12 },
      },
      tailFormItemLayout: {
        wrapperCol: {
          xs: {
            span: 24,
            offset: 0,
          },
          sm: {
            span: 16,
            offset: 8,
          },
        },
      },
      labelCol1: { span: 4 },
      wrapperCol1: { span: 14 },

      columns1: [
        {
          title: "展示内容名称",
          dataIndex: "showName",
          scopedSlots: { customRender: "showName" },
          width: 150,
        },
        {
          title: "排序号",
          dataIndex: "sortCode",
          scopedSlots: { customRender: "sortCode" },
          width: 150,
        },
        {
          title: "操作",
          dataIndex: "operations",
          scopedSlots: { customRender: "operations" },
          width: 100,
        },
      ],
      // 添加展示内容配置
      addBasicsColumns: [
        {
          title: "展示内容名称",
          dataIndex: "showName",
          width: "60%",
        },
        {
          title: "排序码",
          dataIndex: "sortCode",
          width: "30%",
        }
      ],
      // 已选中的报告基础信息配置列表
      addBasicsList:[],
      addLISList:[],
      // addpacsList:[],
      addBLList:[],
      addYZList:[],
      addEMRList:[],
      addBasicsSelectedRows:[],
      addHISData: [],
      addLISData:[],
      // addpacsData:[],
      addBLData:[],
      addYZData:[],
      addEMRData:[],
      rowSelection: {
        onChange: (selectedRowKeys, selectedRows) => {
          this.addBasicsSelectedRows = selectedRows;
        },
      },
      formModel: {
        archivesName: '',
        list:[]
      },
      rules: {
        archivesName: [
          { required: true, message: '请输入名称', trigger: 'blur' },
        ]
      },
      TableAdmin:'TableAdmin',
      butAdmin:'butAdmin',
      TableButSave:'TableButSave',
      TableButReset:'TableButReset',
    };
  },
  beforeCreate() {
    this.form = this.$form.createForm(this, { name: "time_related_controls" });
  },
  created() {
    this.getReportComprehensiveList()
    let userInfo = JSON.parse(sessionStorage.getItem('userInfo'));
    this.isShow(userInfo);
  },
  mounted(){
    let _this = this;
    window.Event.$on("menuLeft", val => {
      _this.menuLeft = val;
      if (_this.menuLeft != "menuDeaDolour") {
        _this.TableAdmin='TableAdmin';
        _this.butAdmin='butAdmin';
        _this.TableButSave='TableButSave';
        _this.TableButReset='TableButReset';
      } else if (_this.menuLeft == "menuDeaDolour") {
        _this.TableAdmin='TableAdmin1';
        _this.butAdmin='butAdmin1';
        _this.TableButSave='TableButSave1';
        _this.TableButReset='TableButReset1';
      }
    });
    // _this.menuLeft1 = _this.$store.state.menuLeft;
    _this.menuLeft1 = sessionStorage.getItem('menuLeft')
    if (_this.menuLeft1 != "menuDeaDolour") {
      _this.TableAdmin='TableAdmin';
      _this.butAdmin='butAdmin';
      _this.TableButSave='TableButSave';
        _this.TableButReset='TableButReset';
    } else if (_this.menuLeft1 == "menuDeaDolour") {
      _this.TableAdmin='TableAdmin1';
      _this.butAdmin='butAdmin1';
      _this.TableButSave='TableButSave1';
        _this.TableButReset='TableButReset1';
    }
  },
  methods: {
    isShow(userInfo) {
      if (userInfo.permissions.includes("cf:synth:archives:add")) {
        this.addShow = true;
      }
      if (userInfo.permissions.includes("cf:synth:archives:remove")) {
        this.deleteShow = true;
      }
      if (userInfo.permissions.includes("cf:synth:archives:edit")) {
        this.editShow = true;
      }
      if (userInfo.permissions.includes("cf:synth:archives:use")) {
        this.useShow = true;
      }
      if (userInfo.permissions.includes("cf:synth:archives:cancelUse")) {
        this.useShow = true;
      }
    },
    onPageChange(current, pageSize) {
      this.pagination.current = current;
      this.pagination.pageSize = pageSize;
      this.getReportComprehensiveList();
    },
    onSizeChange(current) {
      this.pagination.current = current;
      this.getReportComprehensiveList();
    },
    //档案模板配置列表
    getReportComprehensiveList(){
      let _this = this;
      const pageNum = _this.pagination.current;
      const pageSize = _this.pagination.pageSize;
      api.getArchivesList(null, { pageNum, pageSize }).then(res=>{
        if(res.code == 200) {
          _this.pagination.total = res.data.totalCount;
          _this.comprehensiveList = res.data.data;
          _this.comprehensiveList.createTime = moment(_this.comprehensiveList.createTime).format(
            "YYYY-MM-DD HH:MM:SS"
          );
        }
      })
    },
    // 添加HIS配置
    addHISDeploy() {
      let _this = this;
      _this.addBasicsVisible = true;
      api.getArchivesContentConfigList().then(res=>{
        if(res.code == 200) {
          let addHISData = []
          res.data.forEach(e=>{
            if(e.archivesType == 1) {
              addHISData.push(e);
            }
          })
          _this.addHISData = addHISData;
        }
      })
    },
    // 添加HIS展示内容配置提交按钮
    addHISComprehensive() {
      let arr = JSON.parse(JSON.stringify(this.addBasicsSelectedRows).replace(/id/g, 'configId'))
      this.addBasicsList = arr;
      this.addBasicsVisible = false;
    },
    // HIS基础信息配置删除
    aModalHISDelete(configId){
      let addBasicsList = this.addBasicsList;
      let id1 = addBasicsList.findIndex(item => {
        if (item.configId == configId) {
          return true
        }
      })
      addBasicsList.splice(id1, 1)
    },
    // 基础信息配置编辑
    aModalReportEdit(record){
      this.archivesType = record.archivesType;
      this.configId = record.configId;
      this.editBasicsVisible = true;
      this.$nextTick(()=>{
        this.form.setFieldsValue({
          showName: record.showName,
          sortCode: record.sortCode,
        });
      })
    },
    // 编辑展示内容配置提交按钮
    editBasicsReport(){
      let _this = this;
      _this.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          console.log("Received values of form: ", values);
          if(_this.archivesType == 1) {
            let addBasicsList = this.addBasicsList;
            addBasicsList.forEach(e=>{
              if(e.configId == _this.configId) {
                e.showName = values.showName;
                e.sortCode = values.sortCode
                _this.editBasicsVisible = false;
              }
            })
          }
          if(_this.archivesType == 2) {
            let addLISList = _this.addLISList;
            addLISList.forEach(e=>{
              if(e.configId == _this.configId) {
                e.showName = values.showName;
                e.sortCode = values.sortCode
                _this.editBasicsVisible = false;
              }
            })
          }
          if(_this.archivesType == 3) {
            let addpacsList = _this.addpacsList;
            addpacsList.forEach(e=>{
              if(e.configId == _this.configId) {
                e.showName = values.showName;
                e.sortCode = values.sortCode
                _this.editBasicsVisible = false;
              }
            })
          }
          if(_this.archivesType == 4) {
            let addBLList = _this.addBLList;
            addBLList.forEach(e=>{
              if(e.configId == _this.configId) {
                e.showName = values.showName;
                e.sortCode = values.sortCode
                _this.editBasicsVisible = false;
              }
            })
          }
          if(_this.archivesType == 5) {
            let addYZList = _this.addYZList;
            addYZList.forEach(e=>{
              if(e.configId == _this.configId) {
                e.showName = values.showName;
                e.sortCode = values.sortCode
                _this.editBasicsVisible = false;
              }
            })
          }
          if(_this.archivesType == 6) {
            let addEMRList = _this.addEMRList;
            addEMRList.forEach(e=>{
              if(e.configId == _this.configId) {
                e.showName = values.showName;
                e.sortCode = values.sortCode
                _this.editBasicsVisible = false;
              }
            })
          }
        }
      });
    },
    // 编辑展示内容配置返回按钮
    editBasicsreturn(){
      this.editBasicsVisible = false;
    },

    // HIS添加展示内容配置返回按钮
    addBasicsreturn() {
      this.addBasicsVisible = false;
    },

    // 添加LIS配置
    addLISDeploy() {
      let _this = this;
      _this.addLISVisible = true;
      api.getArchivesContentConfigList().then(res=>{
        if(res.code == 200) {
          let addLISData = []
          res.data.forEach(e=>{
            if(e.archivesType == 2) {
              addLISData.push(e);
            }
          })
          _this.addLISData = addLISData;
        }
      })
    },
    // 添加LIS展示内容配置提交按钮
    addLISComprehensive() {
      let arr = JSON.parse(JSON.stringify(this.addBasicsSelectedRows).replace(/id/g, 'configId'))
      console.log(arr)
      this.addLISList = arr;
      this.addLISVisible = false;
    },
    // LIS基础信息配置删除
    aModalLISDelete(configId){
      let addLISList = this.addLISList;
      let id1 = addLISList.findIndex(item => {
        if (item.configId == configId) {
          return true
        }
      })
      addLISList.splice(id1, 1)
    },
    // 添加LIS展示内容配置返回按钮
    addLISreturn() {
      this.addLISVisible = false;
    },

    // 添加pacs配置
    addpacsDeploy() {
      let _this = this;
      _this.addpacsVisible = true;
      api.getArchivesContentConfigList().then(res=>{
        if(res.code == 200) {
          let addpacsData = []
          res.data.forEach(e=>{
            if(e.archivesType == 3) {
              addpacsData.push(e);
            }
          })
          _this.addpacsData = addpacsData;
        }
      })
    },
    // 添加pacs展示内容配置提交按钮
    addpacsComprehensive() {
      let arr = JSON.parse(JSON.stringify(this.addBasicsSelectedRows).replace(/id/g, 'configId'))
      console.log(arr)
      this.addpacsList = arr;
      this.addpacsVisible = false;
    },
    // pacs基础信息配置删除
    aModalpacsDelete(configId){
      let addpacsList = this.addpacsList;
      let id1 = addpacsList.findIndex(item => {
        if (item.configId == configId) {
          return true
        }
      })
      addpacsList.splice(id1, 1)
    },
    // 添加LIS展示内容配置返回按钮
    addpacsreturn() {
      this.addpacsVisible = false;
    },

    // 添加病理配置
    addBLDeploy() {
      let _this = this;
      _this.addBLVisible = true;
      api.getArchivesContentConfigList().then(res=>{
        if(res.code == 200) {
          let addBLData = []
          res.data.forEach(e=>{
            if(e.archivesType == 4) {
              addBLData.push(e);
            }
          })
          _this.addBLData = addBLData;
        }
      })
    },
    // 添加病理展示内容配置提交按钮
    addBLComprehensive() {
      let arr = JSON.parse(JSON.stringify(this.addBasicsSelectedRows).replace(/id/g, 'configId'))
      console.log(arr)
      this.addBLList = arr;
      this.addBLVisible = false;
    },
    // 病理基础信息配置删除
    aModalBLDelete(configId){
      let addBLList = this.addBLList;
      let id1 = addBLList.findIndex(item => {
        if (item.configId == configId) {
          return true
        }
      })
      addBLList.splice(id1, 1)
    },
    // 添加病理展示内容配置返回按钮
    addBLreturn() {
      this.addBLVisible = false;
    },

    // 添加医嘱配置
    addYZDeploy() {
      let _this = this;
      _this.addYZVisible = true;
      api.getArchivesContentConfigList().then(res=>{
        if(res.code == 200) {
          let addYZData = []
          res.data.forEach(e=>{
            if(e.archivesType == 5) {
              addYZData.push(e);
            }
          })
          _this.addYZData = addYZData;
        }
      })
    },
    // 添加医嘱展示内容配置提交按钮
    addYZComprehensive() {
      let arr = JSON.parse(JSON.stringify(this.addBasicsSelectedRows).replace(/id/g, 'configId'))
      console.log(arr)
      this.addYZList = arr;
      this.addYZVisible = false;
    },
    // 医嘱基础信息配置删除
    aModalYZDelete(configId){
      let addYZList = this.addYZList;
      let id1 = addYZList.findIndex(item => {
        if (item.configId == configId) {
          return true
        }
      })
      addYZList.splice(id1, 1)
    },
    // 添加医嘱展示内容配置返回按钮
    addYZreturn() {
      this.addYZVisible = false;
    },

    // 添加EMR配置
    addEMRDeploy() {
      let _this = this;
      _this.addEMRVisible = true;
      api.getArchivesContentConfigList().then(res=>{
        if(res.code == 200) {
          let addEMRData = []
          res.data.forEach(e=>{
            if(e.archivesType == 6) {
              addEMRData.push(e);
            }
          })
          _this.addEMRData = addEMRData;
        }
      })
    },
    // 添加EMR展示内容配置提交按钮
    addEMRComprehensive() {
      let arr = JSON.parse(JSON.stringify(this.addBasicsSelectedRows).replace(/id/g, 'configId'))
      console.log(arr)
      this.addEMRList = arr;
      this.addEMRVisible = false;
    },
    // EMR基础信息配置删除
    aModalEMRDelete(configId){
      let addEMRList = this.addEMRList;
      let id1 = addEMRList.findIndex(item => {
        if (item.configId == configId) {
          return true
        }
      })
      addEMRList.splice(id1, 1)
    },
    // 添加EMR展示内容配置返回按钮
    addEMRreturn() {
      this.addEMRVisible = false;
    },


    // 使用模板
    reportlsUse(archivesId){
      api.useArchives(null,archivesId).then(res=>{
        console.log(res)
        this.$message.success("使用成功");
        this.getReportComprehensiveList()
      })
    },
    // 取消使用模板
    CancelUse(archivesId){
      api.cancelUseArchives(null,archivesId).then(res=>{
        console.log(res)
        this.$message.success("取消成功");
        this.getReportComprehensiveList()
      })
    },
    // 添加档案模板配置
    addDistributed() {
      let _this = this;
       _this.addBasicsList = [];
       _this.addLISList = [];
       _this.addpacsList = [];
       _this.addBLList = [];
       _this.addYZList = [];
       _this.addEMRList = [];
       _this.formModel.archivesName = ''
      _this.addVisible = true;
    },
    // 重置
    closeReturnComprehensive(){
      let _this = this;
       _this.addBasicsList = [];
       _this.addLISList = [];
       _this.addpacsList = [];
       _this.addBLList = [];
       _this.addYZList = [];
       _this.addEMRList = [];
       this.formModel.archivesName = ''
    },
    // 删除
    Delete(archivesId) {
      let _this = this;
      api.removeArchives(null,archivesId).then(res=>{
        if(res.code == 200) {
          _this.$message.success("删除成功");
          _this.getReportComprehensiveList();
        } else {
          _this.$message.error("删除失败");
          _this.getReportComprehensiveList();
        }
      })
    },
    // 编辑
    edit(archivesId) {
      this.editVisible = true;
      this.comprehensiveGetInfo(archivesId)
    },
    // 获取档案模板配置信息
    comprehensiveGetInfo(archivesId){
      let _this = this;
      api.getArchivesInfo(null,archivesId).then(res=>{
        if(res.code == 200) {
          _this.editEchoData = res.data
          console.log(_this.editEchoData)
          _this.formModel.archivesName = _this.editEchoData.archivesName;
          let addBasicsList = [];
          let addLISList = [];
          let addpacsList = [];
          let addBLList = [];
          let addYZList = [];
          let addEMRList = [];
          _this.editEchoData.list.forEach(e=>{
            if(e.archivesType == 1) {
              addBasicsList.push(e);
            }
            if(e.archivesType == 2) {
              addLISList.push(e);
            }
            if(e.archivesType == 3) {
              addpacsList.push(e);
            }
            if(e.archivesType == 4) {
              addBLList.push(e);
            }
            if(e.archivesType == 5) {
              addYZList.push(e);
            }
            if(e.archivesType == 6) {
              addEMRList.push(e);
            }
          })
          _this.addBasicsList = addBasicsList;
          _this.addLISList = addLISList;
          _this.addpacsList = addpacsList;
          _this.addBLList = addBLList;
          _this.addYZList = addYZList;
          _this.addEMRList = addEMRList;
        }
      })
    },

    addReturn() {
      this.$router.push("/comprehensive");
    },
    onChange(value) {
      console.log("changed", value);
    },
    // 新建档案模板配置
    closeAddComprehensive(e) {
      let _this = this;
      _this.$refs.ruleForm.validate(valid => {
        if (valid) {
          let list = []
          _this.addBasicsList.forEach(e=>{
            list.push(e)
          })
          _this.addLISList.forEach(e=>{
            list.push(e)
          })
          _this.addpacsList.forEach(e=>{
            list.push(e)
          })
          _this.addBLList.forEach(e=>{
            list.push(e)
          })
          _this.addYZList.forEach(e=>{
            list.push(e)
          })
          _this.addEMRList.forEach(e=>{
            list.push(e)
          })
          _this.formModel.list = list;

          if(_this.formModel.list.length != 0) {
            api.addArchives(null,_this.formModel).then(res=>{
            if(res.code == 200) {
              _this.$message.success("添加成功");
              _this.addVisible = false;
              _this.getReportComprehensiveList()
            }else {
              _this.$message.error("添加失败");
              _this.addVisible = false;
              _this.getReportComprehensiveList()
            }
          })
          }else if(_this.formModel.list.length == 0) {
            this.$message.error("展示内容配置信息不能为空");
          }

        }
      });
    },
    // 编辑档案模板配置
    closeEditComprehensive() {
      let _this = this;
      _this.$refs.ruleForm.validate(valid => {
        if (valid) {
          _this.formModel.id = this.editEchoData.id;
          let list = []
          _this.addBasicsList.forEach(e=>{
            list.push(e)
          })
          _this.addLISList.forEach(e=>{
            list.push(e)
          })
          _this.addpacsList.forEach(e=>{
            list.push(e)
          })
          _this.addBLList.forEach(e=>{
            list.push(e)
          })
          _this.addYZList.forEach(e=>{
            list.push(e)
          })
          _this.addEMRList.forEach(e=>{
            list.push(e)
          })
          _this.formModel.list = list;
          if(_this.formModel.list.length != 0) {
            api.editArchives(null,_this.formModel).then(res=>{
              if(res.code == 200) {
                _this.$message.success("编辑成功");
                _this.editVisible = false;
                _this.getReportComprehensiveList()
                _this.closeReturnComprehensive()
              }else {
                _this.$message.error("编辑失败");
                _this.editVisible = false;
                _this.getReportComprehensiveList()
                _this.closeReturnComprehensive()
              }
            })
          }else if(_this.formModel.list.length == 0) {
            this.$message.error("展示内容配置信息不能为空");
          }
        }
      });
    },

  },
};
</script>

<style lang="scss" scoped>
.whole {
  position: relative;
  .useDiv {
    display: inline-block;
  }
  .Loading {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .crumbs {
    display: flex;
    padding-left: 31px;
    margin-top: 14px;
    a,
    area,
    button,
    [role="button"],
    input:not([type="range"]),
    label,
    select,
    summary,
    textarea,
    .ant-breadcrumb {
      font-family: MicrosoftYaHei;
      font-size: 18px;
      font-weight: normal;
      font-stretch: normal;
      letter-spacing: 0px;
      color: #4d4d4d;
    }
    .ant-breadcrumb > span:last-child a {
      font-family: MicrosoftYaHei;
      font-size: 18px;
      font-weight: normal;
      letter-spacing: 0px;
      color: #1e7eff;
    }
  }
  .jiange {
    display: inline-block;
    width: 10px;
  }
  .systemForm {
    display: flex;
    justify-content: flex-start;
    margin: 20px 0 20px 25px;
    height: 36px;
    .a_but {
      line-height: 36px;
      font-size: 16px;
      margin-left: 20px;
    }
  }
  .ReportTable {
    margin-left: 25px;
    width: 1560px;
    background: #ffffff;
    border: 1px solid #c4d7e1;
    border-radius: 6px;
    .ReportTableOperate {
      display: flex;
      align-items: center;
      .ReportTableStatus {
        display: inline-block;
        width: 6px;
        height: 6px;
        background: #ff9600;
        border-radius: 50%;
        margin-right: 20px;
      }
      .ReportTableStatus1 {
        display: inline-block;
        width: 6px;
        height: 6px;
        background: #00bf0c;
        border-radius: 50%;
        margin-right: 20px;
      }
    }
  }
  .addDistributed {
    width: 80%;
    display: flex;
    justify-content: flex-start;
    margin: 10px 0;
    margin-left: 30px;
    .userAbut {
      width: 120px;
      height: 36px;
      border-radius: 30px;
      background-color: #0078b5;
      font-size: 17px;
    }
  }
  .aModalReport,
  .aModalReport1 {
    .addForm {
      margin-top: 20px;
      width: 100%;
      position: relative;
      .surName {
        display: flex;
        justify-content: flex-end;
      }
    }
    .reportTitle {
      width: 474px;
      margin: 10px 0 18px 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .center {
        font-size: 16px;
        color: #0078b6;
      }
      .left {
        width: 132px;
        height: 1px;
        background-color: #0078b6;
        opacity: 0.5;
      }
      .right {
        width: 132px;
        height: 1px;
        background-color: #0078b6;
        opacity: 0.5;
      }
    }
    .aTable {
      //min-height: 262px;
      overflow: hidden;
      width: 100%;
      background: #fff;
      border-top: 1px solid #d7e2f1;
    }
  }
  .butSave {
      width: 94px;
      height: 30px;
      border-radius: 30px;
      background-color: #0078b5;
      font-size: 16px;
      color: #fff;
      margin-right: 40px;
    }
  .butReset {
      width: 94px;
      height: 30px;
      border-radius: 30px;
      font-size: 16px;
      color: #0376b7;
      border: 1px solid #0376b7;
  }
  .addForm {
      width: 100%;
      .surName {
        display: flex;
        justify-content: flex-end;
      }
      .radioStatus {
        display: flex;
        height: 60px;
        .status {
          float: left;
        }
        .ant-form-item-control {
          line-height: 60px !important;
        }
      }
    }
}
</style>
<style>
.TableAdmin .ant-table-thead > tr > th .ant-table-header-column {
  color: #5a77b1;
}
.TableAdmin1 .ant-table-thead > tr > th .ant-table-header-column {
  color: #238cc3;
}
.TableAdmin .ant-table-thead > tr > th {
  background-color: #fff !important;
  border-bottom: 1px solid #5c78aa !important;
  color: #5a77b1 !important;
  font-size: 16px !important;
  font-weight: bold !important;
  border-top-left-radius: 10px !important;
  border-top-right-radius: 10px !important;
}
.TableAdmin1 .ant-table-thead > tr > th {
  background-color: #fff !important;
  border-bottom: 1px solid #238cc3 !important;
  color: #238cc3 !important;
  font-size: 16px !important;
  font-weight: bold !important;
  border-top-left-radius: 10px !important;
  border-top-right-radius: 10px !important;
}
.wholeComprehensive .ReportTable {
  position: relative !important;
}

.wholeComprehensive .aModalReport .ant-form-item-label,
.wholeComprehensive .aModalReport1 .ant-form-item-label {
  display: flex !important;
  width: 50px !important;
  margin-left: 10px !important;
}
.wholeComprehensive .aModalReport .ant-form-item-label > label,
.wholeComprehensive .aModalReport1 .ant-form-item-label > label {
  color: #747474;
}
.wholeComprehensive .aModalReport .ant-input,
.wholeComprehensive .aModalReport1 .ant-input {
  width: 425px !important;
}
.wholeComprehensive .aModalReport .has-error .ant-form-explain,.wholeComprehensive .aModalReport .has-error .ant-form-split {
  display: flex !important;
  justify-content: flex-start !important;
}
.wholeComprehensive .aModalReport1 .has-error .ant-form-explain,.wholeComprehensive .aModalReport1 .has-error .ant-form-split {
  display: flex !important;
  justify-content: flex-start !important;
}
.wholeComprehensive .aModalReport .ant-row.ant-form-item,
.wholeComprehensive .aModalReport1 .ant-row.ant-form-item {
  width: 474px !important;
  margin-bottom: 0 !important;
  height: 50px !important;
}
.wholeComprehensive .aModalReport .aTable,
.wholeComprehensive .aModalReport1 .aTable {
  position: relative !important;
  min-height: 225px !important;
}
.wholeComprehensive .aModalReport .ant-table table,
.wholeComprehensive .aModalReport1 .ant-table table {
  width: 474px !important;
}
.wholeComprehensive .aModalReport .ant-table-body,
.wholeComprehensive .aModalReport1 .ant-table-body {
  border: none !important;
  width: 474px !important;
}
.wholeComprehensive .aModalReport .ant-spin-nested-loading,
.wholeComprehensive .aModalReport1 .ant-spin-nested-loading {
  width: 474px !important;
}
.wholeComprehensive .aModalReport .ant-spin-container,
.wholeComprehensive .aModalReport1 .ant-spin-container {
  width: 474px !important;
}
.wholeComprehensive .aModalReport .ant-table-thead,
.wholeComprehensive .aModalReport1 .ant-table-thead {
  width: 474px !important;
}
.wholeComprehensive .aModalReport .ant-table-thead > tr > th,
.wholeComprehensive .aModalReport1 .ant-table-thead > tr > th {
  width: 474px !important;
  background-color: #fff !important;
  border-bottom: 1px solid #d7e2f1 !important;
  color: #5d77ad !important;
  font-size: 16px !important;
}
.wholeComprehensive .aModalReport .ant-table-tbody > tr,
.wholeComprehensive .aModalReport1 .ant-table-tbody > tr {
  width: 474px !important;
  border-bottom: 1px solid #d7e2f1 !important;
}
.wholeComprehensive .aModalReport .ant-spin-nested-loading,
.wholeComprehensive .aModalReport1 .ant-spin-nested-loading {
  width: 474px !important;
  margin: 0 auto !important;
}
.wholeComprehensive .aModalReport .ant-modal-content,
.wholeComprehensive .aModalReport1 .ant-modal-content {
  width: 580px !important;
  box-shadow: 0px 0px 20px 0px rgba(0, 120, 182, 0.6) !important;
}
.wholeComprehensive .aModalReport .ant-modal-body,
.wholeComprehensive .aModalReport1 .ant-modal-body {
  padding-top: 20px !important;
  height: 650px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.wholeComprehensive .aModalReport2 .ant-modal-body {
  height: 250px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0 !important;
}

.wholeComprehensive .aModalReport2 .addBasicsAtable.ant-table-wrapper .ant-table {
  width: 440px !important;
  overflow: hidden !important;
}
.wholeComprehensive .aModalReport2 .ant-modal-wrap,
.wholeComprehensive .aModalReport3 .ant-modal-wrap {
  overflow: hidden !important;
}
.wholeComprehensive .aModalReport2 .ant-modal-content,
.wholeComprehensive .aModalReport3 .ant-modal-content {
  width: 440px !important;
  margin: 0 auto !important;
  margin-top: 60px !important;
  box-shadow: 0px 0px 20px 0px rgba(0, 120, 182, 0.6) !important;
}

.wholeComprehensive .aModalReport3 .addForm.ant-form.ant-form-horizontal.ant-form-hide-required-mark,.wholeComprehensive .aModal1 .addForm.ant-form.ant-form-horizontal.ant-form-hide-required-mark {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}
.wholeComprehensive .aModalReport3 .ant-form-item-label {
  display: flex !important;
  width: 100px !important;
  margin-left: -5px;
}
.wholeComprehensive .aModalReport3 .ant-input {
  height: 36px !important;
}
.wholeComprehensive .aModalReport3 .ant-form-item-control {
  width: 300px !important;
}
.wholeComprehensive .aModalReport3 #register_remark {
  height: 200px !important;
}
.wholeComprehensive .aModalReport3 .aFormItem.ant-row.ant-form-item {
  margin-bottom: 0 !important;
  height: 60px !important;
}
.wholeComprehensive .aModalReport .ant-modal-title,
  .wholeComprehensive .aModalReport1 .ant-modal-title,
  .wholeComprehensive .aModalReport2 .ant-modal-title,
  .wholeComprehensive .aModalReport3 .ant-modal-title {
    display: flex !important;
  }
</style>
